import java.util.Scanner;

public class Test {

    public static void TestBubbleSort(){
        int[] array = {49,38,65,97,76,13,27,49};
        BuubleSort buubleSort = new BuubleSort();
        buubleSort.MybubbleSort(array);
        for(int i = 0; i < array.length; i++){
            System.out.print(array[i] + " ");
        }
    }

    public static void TestNumeral(){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        System.out.println(num + " 的二进制是:" + Integer.toBinaryString(num));
        System.out.println(num + " 的八进制是:" + Integer.toOctalString(num));
        System.out.println(num + " 的十六进制是:" + Integer.toHexString(num));
        System.out.println(num + " 的三进制是:" + Integer.toString(num, 3));

    }

    public static void TestMystr(){
        String str = "hello world";
        Mystr mystr = new Mystr();
        int n = 2; //向左移2位
        char[] c = str.toCharArray();
        System.out.println(mystr.reverse(c,0,n-1));
        System.out.println(mystr.reverse(c,n,c.length-1));
        System.out.println(mystr.reverse(c,0,c.length-1));

    }

    public static void main(String[] args) {
        //TestBubbleSort();
        //TestNumeral();
        TestMystr();
    }
}
